709. To Lower Case

1. Question

Given a string s, return the string after replacing every uppercase letter with the same lowercase letter.

2. Examples

Example 1:

Input: s = "Hello"
Output: "hello"

Example 2:

Input: s = "here"
Output: "here"

Example 3:

Input: s = "LOVELY"
Output: "lovely"

3. Constraints

  • 1 <= s.length <= 100
  • s consists of printable ASCII characters.

4. References

来源:力扣(LeetCode) 链接:https://leetcode-cn.com/problems/to-lower-case 著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。

5. Solutions

class Solution {
    public String toLowerCase(String s) {
        return s.toLowerCase();
    }
}
Copyright © rootwhois.cn 2021-2022 all right reserved,powered by GitbookFile Modify: 2023-03-05 10:55:51

results matching ""

    No results matching ""